import { FormattedMessage } from "@umijs/max";
import { Button, Result } from "antd";
import React from "react";

const ErrorResult: React.FC = () => {
  return (
    <Result
      status="error"
      title={<FormattedMessage id="发生错误" />}
      subTitle={<FormattedMessage id="页面加载错误，请点击按钮重试！" />}
      extra={[
        <Button
          type="primary"
          key="console"
          onClick={() => {
            window.location.reload();
          }}
        >
          <FormattedMessage id="重新加载" />
        </Button>
      ]}
    ></Result>
  );
};

export default ErrorResult;
